package com.jeffse.light.stream.core.data.operator.Covert;

import com.jeffse.light.stream.core.data.descriptor.operatorDescriptor.OperatorDescriptor;
import com.jeffse.light.stream.core.function.advance.MapFunction;

public class MapConvert<T> implements BaseConvert<T> {
    @Override
    public void convert(OperatorDescriptor operatorDescriptor, T value) throws Exception {
        MapFunction mapFunction = (MapFunction) operatorDescriptor.getFunc();
        operatorDescriptor.getCtx().collect(mapFunction.map(value), operatorDescriptor.getNetOperatorDescriptor(), operatorDescriptor.getOutTag());
    }
}
